//import setting from '@/setting'

//导航栏路由
export const navRoute = [
    {
        //聊天界面的路由
        path: '/',
        component: () => import('@/layout/index.vue'),
        name: 'ChatLayout', //命名路由
        meta: {
            icon: 'ChatRound',
            hidden: false, //代表路由标题在菜单中是否隐藏
        },
        redirect: '/chat',
        children: [
            {
                path: '/chat',
                component: () => import('@/layout/chat/index.vue'),
                name: 'ChatDefault',
                meta: {
                    title: '会话',
                    hidden: false, //代表路由标题在菜单中是否隐藏
                },
                children: [],
            },
        ],
    },
    {
        //通讯录界面的路由
        path: '/contacts',
        component: () => import('@/layout/index.vue'),
        name: 'ContactsLayout', //命名路由
        meta: {
            icon: 'User',
            hidden: false, //代表路由标题在菜单中是否隐藏
        },
        redirect: '/contacts',
        children: [
            {
                path: '/contacts',
                component: () => import('@/layout/contacts/index.vue'),
                name: 'ContactsDefault',
                meta: {
                    title: '通讯录',
                    hidden: false, //代表路由标题在菜单中是否隐藏
                },
                children: [
                    {
                        path: '/contacts/newfriends',
                        component: () => import('@/views/newFriend/index.vue'),
                        name: 'NewFriend',
                        meta: {
                            title: '新的朋友',
                            hidden: false, //代表路由标题在菜单中是否隐藏
                        },
                    },
                ],
            },
        ],
    },
    {
        //朋友圈界面的路由
        path: '/dynamic',
        component: () => import('@/layout/index.vue'),
        name: 'DynamicLayout', //命名路由
        meta: {
            icon: 'Help',
            hidden: false, //代表路由标题在菜单中是否隐藏
        },
        redirect: '/dynamic',
        children: [
            {
                path: '/dynamic',
                component: () => import('@/layout/dynamic/index.vue'),
                name: 'Dynamic',
                meta: {
                    title: '朋友圈',
                    hidden: false, //代表路由标题在菜单中是否隐藏
                },
            },
        ],
    },
]

//对外暴露配置路由（常量路由）
export const constantRoute = [
    {
        path: '/register',
        component: () => import('@/views/register/index.vue'),
        name: 'Register', //命名路由
        meta: {
            title: '注册', //菜单标题
            hidden: true, //代表路由标题在菜单中是否隐藏
        },
    },
    {
        path: '/login',
        component: () => import('@/views/login/index.vue'),
        name: 'Login', //命名路由
        meta: {
            title: '登录', //菜单标题
            hidden: true, //代表路由标题在菜单中是否隐藏
        },
    },
    {
        path: '/404',
        component: () => import('@/views/404/index.vue'),
        name: '404', //命名路由
        meta: {
            title: '404', //菜单标题
            hidden: true, //代表路由标题在菜单中是否隐藏
        },
    },
]

//任意路由
export const anyRoute = [
    {
        path: '/:pathMatch(.*)*',
        redirect: '/404',
        name: 'Any', //命名路由
        meta: {
            title: '任意路由', //菜单标题
            hidden: true, //代表路由标题在菜单中是否隐藏
        },
    },
]
